<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="css/base.css">
		<link rel="stylesheet" type="text/css" href="	css/app.css" />
		<link rel="stylesheet" href="fonts/iconfont.css">
	</head>

	<body>
		<header class="mui-bar mui-bar-nav _color">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title titleCenter">收藏夾</h1>
		</header>

		<!--下拉刷新容器-->
		<div id="pullrefresh" class="mui-content mui-scroll-wrapper">
			<div class="mui-scroll">
				<!--数据列表-->
				<ul id="OA_task_1" class="mui-table-view mui-table-view-chevron">
					<li class="mui-table-view-cell mui-media mui-table-view-cell">
						<div class="mui-slider-right mui-disabled">
							<a class="mui-btn mui-btn-red">删除</a>
						</div>
						<div class="mui-slider-handle">
							<a class="mui-navigate-right">
								<img class="mui-media-object mui-pull-left" src="images/cbd.jpg">
								<div class="mui-media-body">
									黄昏
									<p class='mui-ellipsis'>烤炉模式的城，到黄昏，如同打翻的调色盘一般.</p>
								</div>
							</a>
						</div>
					</li>
					<li class="mui-table-view-cell mui-media mui-table-view-cell">
						<div class="mui-slider-right mui-disabled">
							<a class="mui-btn mui-btn-red">删除</a>
						</div>
						<div class="mui-slider-handle">
							<a class="mui-navigate-right">
								<img class="mui-media-object mui-pull-left" src="images/shuijiao.jpg">
								<div class="mui-media-body">
									幸福
									<p class='mui-ellipsis'>能和心爱的人一起睡觉，是件幸福的事情；可是，打呼噜怎么办？</p>
								</div>
							</a>
						</div>
					</li>
					<li class="mui-table-view-cell mui-media mui-table-view-cell">
						<div class="mui-slider-right mui-disabled">
							<a class="mui-btn mui-btn-red">删除</a>
						</div>
						<div class="mui-slider-handle">
							<a class='mui-navigate-right' href="javascript:;">
								<img class="mui-media-object mui-pull-left" src="images/yuantiao.jpg">
								<div class="mui-media-body">
									远眺
									<p class='mui-ellipsis'>静静的看这个世界，最后终于疯了</p>
								</div>
							</a>
						</div>
					</li>
					<li class="mui-table-view-cell mui-media mui-table-view-cell">
						<div class="mui-slider-right mui-disabled">
							<a class="mui-btn mui-btn-red">删除</a>
						</div>
						<div class="mui-slider-handle">
							<a class="mui-navigate-right">
								<img class="mui-media-object mui-pull-left" src="images/cbd.jpg">
								<div class="mui-media-body">
									黄昏
									<p class='mui-ellipsis'>烤炉模式的城，到黄昏，如同打翻的调色盘一般.</p>
								</div>
							</a>
						</div>
					</li>
					<li class="mui-table-view-cell mui-media mui-table-view-cell">
						<div class="mui-slider-right mui-disabled">
							<a class="mui-btn mui-btn-red">删除</a>
						</div>
						<div class="mui-slider-handle">
							<a class="mui-navigate-right">
								<img class="mui-media-object mui-pull-left" src="images/shuijiao.jpg">
								<div class="mui-media-body">
									幸福
									<p class='mui-ellipsis'>能和心爱的人一起睡觉，是件幸福的事情；可是，打呼噜怎么办？</p>
								</div>
							</a>
						</div>
					</li>
					<li class="mui-table-view-cell mui-media mui-table-view-cell">
						<div class="mui-slider-right mui-disabled">
							<a class="mui-btn mui-btn-red">删除</a>
						</div>
						<div class="mui-slider-handle">
							<a class='mui-navigate-right' href="javascript:;">
								<img class="mui-media-object mui-pull-left" src="images/yuantiao.jpg">
								<div class="mui-media-body">
									远眺
									<p class='mui-ellipsis'>静静的看这个世界，最后终于疯了</p>
								</div>
							</a>
						</div>
					</li>
					<li class="mui-table-view-cell mui-media mui-table-view-cell">
						<div class="mui-slider-right mui-disabled">
							<a class="mui-btn mui-btn-red">删除</a>
						</div>
						<div class="mui-slider-handle">
							<a class="mui-navigate-right">
								<img class="mui-media-object mui-pull-left" src="images/cbd.jpg">
								<div class="mui-media-body">
									黄昏
									<p class='mui-ellipsis'>烤炉模式的城，到黄昏，如同打翻的调色盘一般.</p>
								</div>
							</a>
						</div>
					</li>
					<li class="mui-table-view-cell mui-media mui-table-view-cell">
						<div class="mui-slider-right mui-disabled">
							<a class="mui-btn mui-btn-red">删除</a>
						</div>
						<div class="mui-slider-handle">
							<a class="mui-navigate-right">
								<img class="mui-media-object mui-pull-left" src="images/shuijiao.jpg">
								<div class="mui-media-body">
									幸福
									<p class='mui-ellipsis'>能和心爱的人一起睡觉，是件幸福的事情；可是，打呼噜怎么办？</p>
								</div>
							</a>
						</div>
					</li>
					<li class="mui-table-view-cell mui-media mui-table-view-cell">
						<div class="mui-slider-right mui-disabled">
							<a class="mui-btn mui-btn-red">删除</a>
						</div>
						<div class="mui-slider-handle">
							<a class='mui-navigate-right' href="javascript:;">
								<img class="mui-media-object mui-pull-left" src="images/yuantiao.jpg">
								<div class="mui-media-body">
									远眺
									<p class='mui-ellipsis'>静静的看这个世界，最后终于疯了</p>
								</div>
							</a>
						</div>
					</li>
				</ul>

			</div>
		</div>
		<div class="footer-nav">
			<ul class='clearfix'>
				<li class="five ">
					<a href="#"><i class='iconfont icon-all'></i>发现美</a>
				</li>
				<li class="show five">
					<a href="#"><i class='iconfont icon-bangzhu'></i>小助手</a>
				</li>
				<li class=" five">
					<a href="#"><i class='iconfont icon-edit'></i>同游圈</a>
				</li>
				<li class=" five">
					<a href="#"><i class='iconfont icon-favorite'></i>收藏夹</a>
				</li>
			</ul>
		</div>

		<script src="js/mui.min.js"></script>
		<script>
			mui.init({
				pullRefresh: {
					container: '#pullrefresh',
					down: {
						callback: pulldownRefresh
					},
					up: {
						contentrefresh: '正在加载...',
						callback: pullupRefresh
					}
				}
			});
			/**
			 * 下拉刷新具体业务实现
			 */
			function pulldownRefresh() {
				setTimeout(function() {
					var table = document.body.querySelector('.mui-table-view');
					var cells = document.body.querySelectorAll('.mui-table-view-cell');
					mui('#pullrefresh').pullRefresh().endPulldownToRefresh(); //refresh completed
				}, 1500);
			}
			var count = 0;
			/**
			 * 上拉加载具体业务实现
			 */
			function pullupRefresh() {
				setTimeout(function() {
					mui('#pullrefresh').pullRefresh().endPullupToRefresh((++count > 2)); //参数为true代表没有更多数据了。
					var table = document.body.querySelector('.mui-table-view');
					var cells = document.body.querySelectorAll('.mui-table-view-cell');
					//					for (var i = cells.length, len = i + 20; i < len; i++) {
					//						var li = document.createElement('li');
					//						li.className = 'mui-table-view-cell';
					//						li.innerHTML = '<a class="mui-navigate-right">Item ' + (i + 1) + '</a>';
					//						table.appendChild(li);
					//					}
				}, 1500);
			}
			if(mui.os.plus) {
				mui.plusReady(function() {
					setTimeout(function() {
						mui('#pullrefresh').pullRefresh().pullupLoading();
					}, 1000);

				});
			} else {
				mui.ready(function() {
					mui('#pullrefresh').pullRefresh().pullupLoading();
				});
			}
			
</script>
<script>
			mui.init();
			(function($) {
				$('#OA_task_1').on('tap', '.mui-btn', function(event) {
					var elem = this;
					var li = elem.parentNode.parentNode;
					mui.confirm('确认删除该条记录？', 'hello', btnArray, function(e) {
						if (e.index == 0) {
							li.parentNode.removeChild(li);
						} else {
							setTimeout(function() {
								$.swipeoutClose(li);
							}, 0);
						}
					});
				});
				var btnArray = ['确认', '取消'];
			})(mui);
		</script>


	</body>

</html>